package dfbz.demo.homework1;

public class Test {
    public static void main(String[] args) {
        String num="23.23456789";
        HandleAble handleAble = new HandleAble() {
            @Override
            public String HandleString(String num) {
                System.out.println("原数:" + num);
                return num.substring(0, num.indexOf("."));
            }
        };
        String s = handleAble.HandleString("23.23456789");
        System.out.println("取整后：" + s);
        String num2=num.substring(0,7);
        if(num.charAt(7)>=5){
            double num3=Double.valueOf(num2)+0.0001;
            System.out.println(num3);
        }
    }
}
